C program to find length of string